﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Bson;
using MongoDB.Driver;

namespace sqCore
{
    /* Docs:
     * Summary
        * Log object.        
     * Variables
        * LogMessage - Text message.            
        * Params - List of addional info for the log.        
        * calleingData - Data of the class, Function and Thred that write the log.
        * LogID - Unice Id for the log, if any (default: 0).
        * TaskName - If the log belongs to sqTask, contains the Task name.
        * isError - If true, the log will mark as error.
        * Time - Log Time.
     */
    public class sqLog
    {
        public ObjectId Id { get; set; }
        public bool IsError { get; set; }
        public string TaskName { get; set; }
        public string LogMessage { get; set; }
        public DateTime Time { get; set; }        
        public string[] Params { get; set;}
        public int LogID { get; set; }
        public BsonDocument CallingData { get; set; }

        public sqLog()
        {
        }

        public string GetParams()
        {
            return Params.ToJson();
        }
    }


}
